//
//  ViewController.swift
//  动画封装示例
//
//  Created by pg on 2017/8/9.
//  Copyright © 2017年 pg. All rights reserved.
//

import UIKit

class ViewController: UIViewController {

    fileprivate lazy var animationView: UIView = {
       let temView = UIView()
        
        temView.frame = CGRect(x: 10, y: 10, width: 100, height: 100)
        temView.backgroundColor = UIColor.orange
        return temView
    }()
    
    override func viewDidLoad() {
        super.viewDidLoad()
       
        
        self.view.addSubview(animationView)
        
        
        
        
    }
    
    override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
        let endframe = CGRect(x: 200, y: 400, width: 50, height: 50)
      //  animationView.moveToRect(endFrame: endframe , direction: ZMRefactorDirection.Vertical, animationTime: 10)
        
        animationView.moveToframe(finallyFrame: endframe, animationTime: 2) {
        
        }
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }


}

